e8ef3fdc758bfee15edd14155ab1ed3543a93bb1,planner/src/main/java/edu/isi/wings/workflow/template/api/impl/kb/TemplateKB.java,TemplateKB,getLink,#Node#Node#Port#Port#,863

Before Change


				ok = false;
			if(l.getOriginPort() != null && fromPort != null && !l.getOriginPort().getID().equals(fromPort.getID()))
				ok = false;
			if(l.getDestinationNode() != null && toN != null && !l.getDestinationNode().getID().equals(toN.getID()))
				ok = false;
			if(l.getDestinationPort() != null && toPort != null && !l.getDestinationPort().getID().equals(toPort.getID()))
				ok = false;

After Change


	  ArrayList<Link> links = new ArrayList<Link>();
	  if(fromN != null && nodeOutputLinks.containsKey(fromN.getID())) {
	    links.addAll(this.nodeOutputLinks.get(fromN.getID()));
	    if(toN != null && nodeInputLinks.containsKey(toN.getID()))
	      links.retainAll(this.nodeInputLinks.get(toN.getID()));
	  }
	  else if(toN != null && nodeInputLinks.containsKey(toN.getID())) {
	    links.addAll(this.nodeInputLinks.get(toN.getID()));